home *** CD-ROM | disk | FTP | other *** search
Wrap
#!/bin/sh TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP fi T_PX="`cat $TMP/SeTT_PX`" ROOT_DEVICE="`cat $TMP/SeTrootdev`" if [ ! -d $T_PX/bin -a ! -d $T_PX/etc ]; then # if there no Linux here, exit exit fi # Check for disk full error: . /usr/lib/setup/SeTfull # These next lines are intended to clean up any permissions # problems that could be caused by a bad package. We don't # intend to make any bad packages here, but it never hurts # to be safe. :^) ( cd $T_PX ; chmod 755 ./ ) ( cd $T_PX ; chmod 755 ./var ) if [ -d $T_PX/usr/src/linux ]; then chmod 755 $T_PX/usr/src/linux fi if [ ! -d $T_PX/proc ]; then mkdir $T_PX/proc chown root.root $T_PX/proc fi chmod 1777 $T_PX/tmp if [ ! -d $T_PX/var/spool/mail ]; then mkdir -p $T_PX/var/spool/mail chmod 755 $T_PX/var/spool chown root.mail $T_PX/var/spool/mail chmod 1777 $T_PX/var/spool/mail fi # Load keyboard map (if any) when booting if [ -r $TMP/SeTkeymap ]; then MAPNAME="`cat $TMP/SeTkeymap`" echo "#!/bin/sh" > $T_PX/etc/rc.d/rc.keymap echo "# Load the keyboard map. More maps are in /usr/share/kbd/keymaps." \ >> $T_PX/etc/rc.d/rc.keymap echo "source /etc/rc.d/functions.sh" >> $T_PX/etc/rc.d/rc.keymap echo "export TEXTDOMAINDIR=/etc/rc.messages" >> $T_PX/etc/rc.d/rc.keymap echo "export TEXTDOMAIN=inits_keymap" >> $T_PX/etc/rc.d/rc.keymap echo "setlang" >> $T_PX/etc/rc.d/rc.keymap echo >> $T_PX/etc/rc.d/rc.keymap echo "if [ -x /usr/bin/loadkeys ]; then" >> $T_PX/etc/rc.d/rc.keymap echo "msg=\"\`gettext \"Loading keyboard map\"\`\"" >> $T_PX/etc/rc.d/rc.keymap echo "status /usr/bin/loadkeys $MAPNAME" >> $T_PX/etc/rc.d/rc.keymap echo "fi" >> $T_PX/etc/rc.d/rc.keymap chmod 755 $T_PX/etc/rc.d/rc.keymap fi # Only ask if we want to skip configuring if we suspect the user should # skip the step: if [ -r $T_PX/etc/fstab ]; then dialog --title "`gettext SeTconfig "CONFIGURE THE SYSTEM"`" --yesno "`gettext SeTconfig "Now we can configure your \ Linux system. If this is a new installation, you MUST configure it now or it \ will not boot correctly. However, if you are just adding software to an \ existing system, you can back out to the main menu and skip this step. \ You want to CONFIGURE your system, right?"`" 0 0 if [ ! $? = 0 ]; then exit fi else dialog --title "`gettext SeTconfig "DONE INSTALLING PACKAGES"`" --infobox \ "`gettext SeTconfig "Preparing to configure your new Linux system..."`" 3 54 sleep 4 fi if [ -x $T_PX/sbin/ldconfig ]; then dialog --title "`gettext SeTconfig "Searching for system libs"`" --infobox \ "`gettext SeTconfig "Building libraries database..."`" 3 54 chroot $T_PX /sbin/ldconfig sleep 3 fi if [ -x $T_PX/usr/bin/gdk-pixbuf-update-loaders ]; then chroot $T_PX /usr/bin/gdk-pixbuf-update-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders fi if [ -x $T_PX/sbin/depmod ]; then dialog --title "`gettext SeTconfig "Searching for kernel modules"`" --infobox \ "`gettext SeTconfig "Building kernel modules dependency file..."`" 3 54 chroot $T_PX /sbin/depmod -a sleep 3 fi if [ -x $T_PX/usr/bin/fc-cache ]; then dialog --title "`gettext SeTconfig "FONTCONFIG UPDATE"`" --infobox \ "`gettext SeTconfig "Please wait while we generate font.cache-1 files with fc-cache. \ For best results, fc-cache should be run whenever fonts are \ added to the system."`" 5 68 chroot $T_PX /usr/bin/fc-cache -f 1> /dev/null 2> /dev/null fi if [ -x $T_PX/usr/bin/update-desktop-database ] ; then chroot $T_PX /usr/bin/update-desktop-database &>/dev/null fi while [ 1 ] ; do ( . /usr/lib/setup/SeTinitrd ) if [ -f /mnt/boot/initrd -o -f /mnt/boot/initrd.new ]; then dialog --title "Done" --msgbox "`gettext SeTconfig "You can find your initrd image in a '/boot' directory on your target partition."`" 6 60 break else dialog --title "ERROR" --yesno "`gettext SeTconfig "UNABLE TO MAKE INITRD IMAGE !!! Your system will NOT boot without initrd !!! Do you want to setup initrd again? (RECOMMENDED)."`" 7 60 if [ $? = 0 ] ; then continue else break fi fi done ( . /usr/lib/setup/SeTbootloader ) chroot $T_PX mount proc -t proc /proc &>/dev/null chroot $T_PX mount sys -t sysfs /sys &>/dev/null #if [ -x $T_PX/sbin/makebootdisk ]; then #chroot $T_PX /sbin/makebootdisk #fi #if [ -x $T_PX/sbin/modemdeviceconfig ]; then #chroot $T_PX /sbin/modemdeviceconfig #fi if [ -x $T_PX/usr/sbin/mouseconfig ]; then chroot $T_PX /usr/sbin/mouseconfig fi if [ -x $T_PX/sbin/netconfig ]; then chroot $T_PX /sbin/netconfig fi if [ -x $T_PX/sbin/services-setup ]; then chroot $T_PX /sbin/services-setup fi if [ -x $T_PX/usr/sbin/timeconfig ]; then chroot $T_PX /usr/sbin/timeconfig fi if [ -x $T_PX/sbin/loginmanagersetup ]; then chroot $T_PX /sbin/loginmanagersetup fi if [ -x $T_PX/usr/bin/xwmconfig ]; then chroot $T_PX /usr/bin/xwmconfig fi chroot $T_PX umount /proc &>/dev/null chroot $T_PX umount /sys &>/dev/null ( . /usr/lib/setup/SeTXorg ) ( . /usr/lib/setup/SeTrunlevel ) ( . /usr/lib/setup/SeTlocale ) # Set root password: /usr/lib/setup/SeTusers